﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:mr="http://mishrareader.codeplex.com/Reader"
                    xmlns:options="clr-namespace:MishraReader.ViewModels.Settings.Options;assembly=MishraReader.ViewModels">
    <DataTemplate DataType="{x:Type options:GenericConfigurationViewModel}">
        <Popup 
               mr:ElementSpy.NameScopeSource="{DynamicResource saVmSpy}"
               StaysOpen="True" 
               AllowsTransparency="True" 
               PlacementTarget="{Binding ElementName=btnConfigure}" 
               PopupAnimation="Fade" Placement="Center" 
               IsOpen="{Binding ShowData}">
            <Grid Margin="10" Width="250"  Height="200" >
                <Border Background="{DynamicResource MetroBg}" BorderBrush="{DynamicResource MetroAccentBrush}" BorderThickness="1">
                    <Border.Effect>
                        <DropShadowEffect Color="{DynamicResource MetroColorFeature}" ShadowDepth="0" Direction="0" BlurRadius="3" />
                    </Border.Effect>
                </Border>
                <DockPanel Margin="10">
                    <TextBlock DockPanel.Dock="Top" Text="{Binding ServiceName, Mode=OneWay}" Style="{StaticResource MetroHeader1}" Margin="0,0,0,15"/>

                    <mr:WatermarkTextBox 
                        Text="{Binding Username}"
                        DockPanel.Dock="Top" Grid.Row="0" Watermark="USER NAME" Grid.Column="1" Margin="0,0,0,10"/>
                    <mr:WatermarkPasswordBox 
                        Password="{Binding Password}"
                        DockPanel.Dock="Top" Watermark="PASSWORD" Grid.Row="1"  Grid.Column="1" Margin="0,0,0,10"/>

                    <StackPanel DockPanel.Dock="Top" Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,10,0,0">
                        <Button Content="save changes" 
                                Command="{Binding OkayCommand}"
                                Style="{StaticResource MetroAccentButton}" Margin="15,0,0,0" />
                        <Button Content="cancel"
                                Command="{Binding CancelCommand}"
                                Style="{StaticResource MetroAccentButton}" Margin="15,0,0,0" />
                    </StackPanel>
                </DockPanel>
            </Grid>
        </Popup>
    </DataTemplate>
</ResourceDictionary>